<?php

# 监听脚本

require_once 'bootstrap.php';

use Service\Task;

while (true) {
    $taskObj = new Task();
    $task = $taskObj->pop();
    if ($task) {
        $taskObj->run($task);
    }
    sleep(2);
}